<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="_token" content="{{csrf_token()}}">
    <title>录入-高层建筑基础信息采集</title>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <style>
        html,
        body,
        #app {
            margin: 0;
            padding: 20px 8px 0;
            align-items: center;
        }

        [v-cloak] {
            display: none !important;
        }
        .button{
            width: 100%;margin-top: 10px;
        }
        .el-radio.is-bordered+.el-radio.is-bordered {
             margin-left: 0px;
        }
        .radios, .checkboxs{
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
        }
        .radios .radio,.checkboxs .checkbox{
           width: 45%;
        }
        .el-radio,.el-checkbox{
            width: 100%;margin-right: 0;margin-bottom: 15px;
        }
        .el-form--label-top .el-form-item__label {
             padding: 0 0 5px 0;
        }
        .el-upload--picture-card{
            width: 88px;
            height: 88px;
            line-height: 90px;
        }
        .el-upload-list--picture-card .el-upload-list__item {
            width: 88px;
            height: 88px;
        }
        .el-upload-list--picture-card .el-upload-list__item-status-label {
            background: #0095ff;
        }
        .el-upload__tip{
            line-height: 0;color: #F56C6C;font-style:italic;
        }
        .app-header{
            color: #0095ff;
            text-align: center;background: #FFFFFF;width: 100%;left:0;top:0;z-index: 1000;
            position: fixed;height: 50px;line-height: 50px;font-weight: 700;font-size: 16px;
        }
        .app-back{
            position: absolute;
            left: 15px;font-size: 14px;
        }
        .el-input-number {
            width: 100%;
        }
        .add{
            position: fixed;right: 10px;bottom: 85px;
            text-align: center;
            display: flex; flex-wrap: wrap;
        }
        .add .el-button{
            margin-left: 0px;padding: 7px 0px;
        }
        .el-message--error {
            min-width: calc(100vw - 16px);
        }
    </style>
</head>
<body>
<div id="app" v-cloak>
    <div class="app-header">
        <div class="app-back" @click="back"><i class="el-icon-arrow-left"></i>返回</div>
        高层建筑基础信息采集
    </div>
    <el-form ref="form" :model="form" :rules="rules"  label-position="top">
        <el-form-item label="乡镇街道：" prop="street">
            <el-radio-group v-model="form.street" class="radios" @input="storeStreet">
                <div class="radio" v-for="(streetItem,index) in streets" :key="index">
                    <el-radio border :label="Number(index)">@{{ streetItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="社区：" prop="community">
            <el-input v-model="form.community" @input="store" @blur="store" placeholder="请填写社区"></el-input>
        </el-form-item>
        <el-form-item label="小区：" prop="village">
            <el-input v-model="form.village" @input="store" @blur="store" placeholder="请填写小区"></el-input>
        </el-form-item>
        <el-form-item label="特殊楼栋：" prop="special">
            <el-radio-group v-model="form.special" class="radios" @input="store">
                <div class="radio" v-for="(specialItem,index) in specials" :key="index">
                    <el-radio border :label="Number(index)">@{{ specialItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="楼栋：" prop="building">
            <el-input v-model="form.building" @input="store" @blur="store" placeholder="请填写楼栋"></el-input>
        </el-form-item>
        <el-form-item label="高层建筑名称：" prop="name">
            <el-input v-model="form.name" @input="store" @blur="store" placeholder="请填写高层建筑名称"></el-input>
        </el-form-item>
        <el-form-item label="详细地址：" prop="address">
            <el-input v-model="form.address" @input="store" @blur="store"  placeholder="请填写详细地址"></el-input>
        </el-form-item>
        <el-form-item label="建筑照片" prop="thumb">
            <el-upload
                class="uploader" :file-list="thumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="排查地址：" prop="p_address">
            <el-input v-model="form.p_address" @input="store" @blur="store"  placeholder="请填写排查地址"></el-input>
        </el-form-item>
        <el-form-item label="建筑面积(㎡)：" prop="area">
            <el-input v-model="form.area" @input="store" @blur="store"  placeholder="请填写建筑面积"></el-input>
        </el-form-item>
        <el-form-item label="地上楼层：" prop="ground">
            <el-input v-model="form.ground" @input="store" @blur="store"  placeholder="请填写地上楼层"></el-input>
        </el-form-item>
        <el-form-item label="吊层楼层：" prop="layer">
            <el-input v-model="form.layer" @input="store" @blur="store"  placeholder="请填写吊层楼层,没有不填写"></el-input>
        </el-form-item>
        <el-form-item label="地下楼层：" prop="underground">
            <el-input v-model="form.underground" @input="store" @blur="store"  placeholder="请填写地下楼层"></el-input>
        </el-form-item>
        <el-form-item label="高度(米)：" prop="height">
            <el-input v-model="form.height" @input="store" @blur="store"  placeholder="请填写高度"></el-input>
        </el-form-item>
        <el-form-item label="建筑定性：" prop="nature">
            <el-radio-group v-model="form.nature">
                <el-radio border v-for="(natureItem,index) in natures" :key="index"  :label="Number(index)">@{{ natureItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="建筑内使用功能：" prop="shape">
            <el-checkbox-group v-model="form.shape" class="checkboxs" @change="store">
                <div class="checkbox" v-for="(shapeItem,index) in shapes" :key="index">
                    <el-checkbox border :label="index" name="shape">@{{ shapeItem }}</el-checkbox>
                </div>
            </el-checkbox-group>
        </el-form-item>
        <el-form-item label="建成年代：" prop="year">
            <el-input v-model="form.year" @input="store" @blur="store"  placeholder="请填写建成年代"></el-input>
        </el-form-item>
        <el-form-item label="消防安全管理形式：" prop="form">
            <el-radio-group v-model="form.form"  @input="store">
                <el-radio border v-for="(formItem,index) in forms" :key="index"  :label="Number(index)">@{{ formItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="管理主体：" prop="body">
            <el-input v-model="form.body" @input="store" @blur="store"  placeholder="请填写管理主体"></el-input>
        </el-form-item>
        <el-form-item label="消防安全管理人：" prop="person">
            <el-input v-model="form.person" @input="store" @blur="store"  placeholder="请填写消防安全管理人"></el-input>
        </el-form-item>
        <el-form-item label="管理人是否是注册消防工程师：" prop="sfpe">
            <el-radio-group v-model="form.sfpe" class="radios"  @input="store">
                <div class="radio" v-for="(sfpeItem,index) in sfpes" :key="index">
                    <el-radio border :label="Number(index)">@{{ sfpeItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="联系电话：" prop="mobile">
            <el-input v-model="form.mobile" @input="store" @blur="store"  placeholder="请填写联系电话"></el-input>
        </el-form-item>
        <el-form-item label="有无维保单位：" prop="maintenance">
            <el-radio-group v-model="form.maintenance"  @input="store">
                <el-radio border v-for="(maintenanceItem,index) in maintenances" :key="index" :label="Number(index)">@{{ maintenanceItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="维保单位名称：" prop="company">
            <el-input v-model="form.company" @input="store" @blur="store"  placeholder="请填写维保单位名称"></el-input>
        </el-form-item>
        <el-form-item label="大修基金情况：" prop="fund">
            <el-radio-group v-model="form.fund" class="radios" @input="store">
                <div class="radio" v-for="(fundItem,index) in funds" :key="index">
                    <el-radio border :label="Number(index)">@{{ fundItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="是否存在可燃雨棚：" prop="rainshed">
            <el-radio-group v-model="form.rainshed" class="radios" @input="store">
                <div class="radio" v-for="(rainshedItem,index) in rainsheds" :key="index">
                    <el-radio border :label="Number(index)">@{{ rainshedItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在可燃雨棚图片：" prop="rainshed_thumb">
            <el-upload
                class="uploader" :file-list="rainshedThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('rainshed_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('rainshed_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="是否存在违规设置突出外墙防护网现象：" prop="wall">
            <el-radio-group v-model="form.wall" @input="store">
                <el-radio border  v-for="(wallItem,index) in walls" :key="index" :label="Number(index)">@{{ wallItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在违规设置突出外墙防护网图片：" prop="wall_thumb">
            <el-upload
                class="uploader" :file-list="wallThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('wall_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('wall_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="是否存在电动自行车违规停放充电现象：" prop="bicycle">
            <el-radio-group v-model="form.bicycle" @input="store">
                <el-radio border  v-for="(bicycleItem,index) in bicycles" :key="index" :label="Number(index)">@{{ bicycleItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在电动自行车违规停放充电图片：" prop="bicycle_thumb">
            <el-upload
                class="uploader" :file-list="bicycleThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('bicycle_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('bicycle_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="消防车道、消防车救援场地是否按要求设置标志标牌、施划标线：" prop="sign">
            <el-radio-group v-model="form.sign" class="radios" @input="store">
                <div class="radio" v-for="(signItem,index) in signs" :key="index">
                    <el-radio border :label="Number(index)">@{{ signItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="消防车道、消防车救援场地未按要求设置标志标牌、施划标线图片：" prop="sign_thumb">
            <el-upload
                class="uploader" :file-list="signThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('sign_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('sign_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="消防车通道情况：" prop="channel">
            <el-radio-group v-model="form.channel" @input="store">
                <el-radio border  v-for="(channelItem,index) in channels" :key="index" :label="Number(index)">@{{ channelItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="消防车通道存在隐患图片：" prop="channel_thumb">
            <el-upload
                class="uploader" :file-list="channelThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('channel_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('channel_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="建筑内疏散通道、安全出口：" prop="speak">
            <el-radio-group v-model="form.speak" @input="store">
                <el-radio border  v-for="(speakItem,index) in speaks" :key="index" :label="Number(index)">@{{ speakItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="建筑内疏散通道、安全出口存在隐患图片：" prop="speak_thumb">
            <el-upload
                class="uploader" :file-list="speakThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('speak_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('speak_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="火灾自动报警系统设置情况：" prop="fire">
            <el-radio-group v-model="form.fire" class="radios" @input="(value)=> change('fire', value)">
                <div class="radio" v-for="(fireItem,index) in fires" :key="index">
                    <el-radio border :label="Number(index)">@{{ fireItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="火灾自动报警系统功能情况：" prop="fire_use">
            <el-radio-group v-model="form.fire_use" @input="store">
                <el-radio border  v-for="(fireUseItem,index) in fire_uses" :key="index" :label="Number(index)">@{{ fireUseItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="火灾自动报警系统隐患图片：" prop="fire_use_thumb">
            <el-upload
                class="uploader" :file-list="fireUseThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('fire_use_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('fire_use_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="室内消火栓系统设置情况：" prop="hydrant">
            <el-radio-group v-model="form.hydrant" class="radios" @input="(value)=> change('hydrant', value)">
                <div class="radio" v-for="(hydrantItem,index) in hydrants" :key="index">
                    <el-radio border :label="Number(index)">@{{ hydrantItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="室内消火栓系统功能情况：" prop="hydrant_use">
            <el-radio-group v-model="form.hydrant_use" class="radios" @input="store">
                <div class="radio" v-for="(hydrantUseItem,index) in hydrant_uses" :key="index">
                    <el-radio border :label="Number(index)">@{{ hydrantUseItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="室内消火栓系统隐患图片：" prop="hydrant_use_thumb">
            <el-upload
                class="uploader" :file-list="hydrantUseThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hydrant_use_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hydrant_use_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="室外消火栓系统设置情况：" prop="whydrant">
            <el-radio-group v-model="form.whydrant" class="radios" @input="(value)=> change('whydrant', value)">
                <div class="radio" v-for="(whydrantItem,index) in whydrants" :key="index">
                    <el-radio border :label="Number(index)">@{{ whydrantItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="室外消火栓系统功能情况：" prop="whydrant_use">
            <el-radio-group v-model="form.whydrant_use" class="radios" @input="store">
                <div class="radio" v-for="(whydrantUseItem,index) in whydrant_uses" :key="index">
                    <el-radio border :label="Number(index)">@{{ whydrantUseItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="室外消火栓系统隐患图片：" prop="whydrant_use_thumb">
            <el-upload
                class="uploader" :file-list="whydrantUseThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('whydrant_use_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('whydrant_use_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="自动喷水灭火系统设置情况：" prop="outfire">
            <el-radio-group v-model="form.outfire" class="radios" @input="(value)=> change('outfire', value)">
                <div class="radio" v-for="(outfireItem,index) in outfires" :key="index">
                    <el-radio border :label="Number(index)">@{{ outfireItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="自动喷水灭火系统功能情况：" prop="outfire_use">
            <el-radio-group v-model="form.outfire_use" class="radios" @input="store">
                <div class="radio" v-for="(outfireUseItem,index) in outfire_uses" :key="index">
                    <el-radio border :label="Number(index)">@{{ outfireUseItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="自动喷水灭火系统隐患图片：" prop="outfire_use_thumb">
            <el-upload
                class="uploader" :file-list="outfireUseThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('outfire_use_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('outfire_use_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="机械防、排烟系统设置情况：" prop="smoke">
            <el-radio-group v-model="form.smoke" class="radios" @input="(value)=> change('smoke', value)">
                <div class="radio" v-for="(smokeItem,index) in smokes" :key="index">
                    <el-radio border :label="Number(index)">@{{ smokeItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="机械防、排烟系统功能情况：" prop="smoke_use">
            <el-radio-group v-model="form.smoke_use" @input="store">
                <el-radio border  v-for="(smokeUseItem,index) in smoke_uses" :key="index" :label="Number(index)">@{{ smokeUseItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="机械防、排烟系统隐患图片：" prop="smoke_use_thumb">
            <el-upload
                class="uploader" :file-list="smokeUseThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('smoke_use_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('smoke_use_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="防火卷帘设置情况：" prop="shutter">
            <el-radio-group v-model="form.shutter" class="radios" @input="(value)=> change('shutter', value)">
                <div class="radio" v-for="(shutterItem,index) in shutters" :key="index">
                    <el-radio border :label="Number(index)">@{{ shutterItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="防火卷帘功能情况：" prop="shutter_use">
            <el-radio-group v-model="form.shutter_use" @input="store">
                <el-radio border  v-for="(shutterUseItem,index) in shutter_uses" :key="index" :label="Number(index)">@{{ shutterUseItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="防火卷帘隐患图片：" prop="shutter_use_thumb">
            <el-upload
                class="uploader" :file-list="shutterUseThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('shutter_use_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('shutter_use_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="气体灭火系统设置情况：" prop="gas">
            <el-radio-group v-model="form.gas" class="radios" @input="(value)=> change('gas', value)">
                <div class="radio" v-for="(gasItem,index) in gass" :key="index">
                    <el-radio border :label="Number(index)">@{{ gasItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="气体灭火系统功能情况：" prop="gas_use">
            <el-radio-group v-model="form.gas_use" @input="store">
                <el-radio border  v-for="(gasUseItem,index) in gas_uses" :key="index" :label="Number(index)">@{{ gasUseItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="气体灭火系统隐患图片：" prop="gas_use_thumb">
            <el-upload
                class="uploader" :file-list="gasUseThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('gas_use_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('gas_use_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="治理重点对象标签：" prop="keynote">
            <el-radio-group v-model="form.keynote" @input="store">
                <el-radio border  v-for="(keynoteItem,index) in keynotes" :key="index" :label="Number(index)">@{{ keynoteItem }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="建筑外墙外保温材料：" prop="warm" required>
            <el-radio-group v-model="form.warm" class="radios" @input="store">
                <div class="radio" v-for="(warmItem,index) in warms" :key="index">
                    <el-radio border :label="Number(index)">@{{ warmItem }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="人员密集场所室内采易燃可燃材料装修：" prop="hidden1">
            <el-radio-group v-model="form.hidden1" @input="store">
                <el-radio border  v-for="(hidden1Item,index) in hidden1s" :key="index" :label="Number(index)">@{{ hidden1Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="人员密集场所室内采易燃可燃材料装修隐患图片：" prop="hidden1_thumb">
            <el-upload
                class="uploader" :file-list="hidden1ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden1_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden1_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="违规设置群租房：" prop="hidden2">
            <el-radio-group v-model="form.hidden2" @input="store">
                <el-radio border  v-for="(hidden2Item,index) in hidden2s" :key="index" :label="Number(index)">@{{ hidden2Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="违规设置群租房图片：" prop="hidden2_thumb">
            <el-upload
                class="uploader" :file-list="hidden2ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden2_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden2_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="搭建易燃可燃彩钢板：" prop="hidden3">
            <el-radio-group v-model="form.hidden3" @input="store">
                <el-radio border  v-for="(hidden3Item,index) in hidden3s" :key="index" :label="Number(index)">@{{ hidden3Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在搭建易燃可燃彩钢板图片：" prop="hidden3_thumb">
            <el-upload
                class="uploader" :file-list="hidden3ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden3_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden3_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="避难层（间）被占用或擅自改变用途：" prop="hidden4">
            <el-radio-group v-model="form.hidden4" @input="store">
                <el-radio border  v-for="(hidden4Item,index) in hidden4s" :key="index" :label="Number(index)">@{{ hidden4Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在避难层（间）被占用或擅自改变用途图片：" prop="hidden4_thumb">
            <el-upload
                class="uploader" :file-list="hidden4ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden4_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden4_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="违规储存、经营、使用易燃易爆危险品：" prop="hidden5">
            <el-radio-group v-model="form.hidden5" @input="store">
                <el-radio border  v-for="(hidden5Item,index) in hidden5s" :key="index" :label="Number(index)">@{{ hidden5Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在违规储存、经营、使用易燃易爆危险品图片：" prop="hidden5_thumb">
            <el-upload
                class="uploader" :file-list="hidden5ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden5_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden5_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="电气线路私拉乱接：" prop="hidden6">
            <el-radio-group v-model="form.hidden6" @input="store">
                <el-radio border  v-for="(hidden6Item,index) in hidden6s" :key="index" :label="Number(index)">@{{ hidden6Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在电气线路私拉乱接图片：" prop="hidden6_thumb">
            <el-upload
                class="uploader" :file-list="hidden6ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden6_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden6_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="电缆井内电气线路敷设不符合规范：" prop="hidden7">
            <el-radio-group v-model="form.hidden7" @input="store">
                <el-radio border  v-for="(hidden7Item,index) in hidden7s" :key="index" :label="Number(index)">@{{ hidden7Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在电缆井内电气线路敷设不符合规范图片：" prop="hidden7_thumb">
            <el-upload
                class="uploader" :file-list="hidden7ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden7_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden7_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="防火封堵、被破坏：" prop="hidden8">
            <el-radio-group v-model="form.hidden8" @input="store">
                <el-radio border  v-for="(hidden8Item,index) in hidden8s" :key="index" :label="Number(index)">@{{ hidden8Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在防火封堵、被破坏图片：" prop="hidden8_thumb">
            <el-upload
                class="uploader" :file-list="hidden8ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden8_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden8_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="违规使用瓶装液化气石油气：" prop="hidden9">
            <el-radio-group v-model="form.hidden9" @input="store">
                <el-radio border  v-for="(hidden9Item,index) in hidden9s" :key="index" :label="Number(index)">@{{ hidden9Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在违规使用瓶装液化气石油气图片：" prop="hidden9_thumb">
            <el-upload
                class="uploader" :file-list="hidden9ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden9_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden9_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="燃气管线用具敷设安装不规范：" prop="hidden10">
            <el-radio-group v-model="form.hidden10" @input="store">
                <el-radio border  v-for="(hidden10Item,index) in hidden10s" :key="index" :label="Number(index)">@{{ hidden10Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在燃气管线用具敷设安装不规范图片：" prop="hidden10_thumb">
            <el-upload
                class="uploader" :file-list="hidden10ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden10_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden10_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="消防控制室值班人员配备不到位：" prop="hidden11">
            <el-radio-group v-model="form.hidden11" @input="store">
                <el-radio border  v-for="(hidden11Item,index) in hidden11s" :key="index" :label="Number(index)">@{{ hidden11Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在消防控制室值班人员配备不到位图片：" prop="hidden11_thumb">
            <el-upload
                class="uploader" :file-list="hidden11ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden11_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden11_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="影响灭火救援的装饰、广告牌：" prop="hidden12">
            <el-radio-group v-model="form.hidden12" @input="store">
                <el-radio border  v-for="(hidden12Item,index) in hidden12s" :key="index" :label="Number(index)">@{{ hidden12Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在影响灭火救援的装饰、广告牌图片：" prop="hidden12_thumb">
            <el-upload
                class="uploader" :file-list="hidden12ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden12_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden12_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="配建车库违规改变使用功能：" prop="hidden13">
            <el-radio-group v-model="form.hidden13" @input="store">
                <el-radio border  v-for="(hidden13Item,index) in hidden13s" :key="index" :label="Number(index)">@{{ hidden13Item }}</el-radio>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在配建车库违规改变使用功能图片：" prop="hidden13_thumb">
            <el-upload
                class="uploader" :file-list="hidden13ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden13_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden13_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="是否存在其他隐患：" prop="hidden14">
            <el-radio-group v-model="form.hidden14" class="radios" @input="store">
                <div class="radio" v-for="(hidden14Item,index) in hidden14s" :key="index" >
                    <el-radio border :label="Number(index)">@{{ hidden14Item }}</el-radio>
                </div>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="存在其他隐患图片：" prop="hidden14_thumb">
            <el-upload
                class="uploader" :file-list="hidden14ThumbList"
                list-type="picture-card" accept="image/*"
                name="image" multiple :limit="limit"
                :action="upload" :on-exceed="exceed"
                :on-success="(response,file)=> handleSuccess('hidden14_thumb', response, file)"
                :on-remove="(file,fileList)=> handleRemove('hidden14_thumb', file, fileList)"
                :before-upload="beforeUpload">
                <i class="el-icon-camera-solid uploader-icon"></i>
                <div class="el-upload__tip" slot="tip"><i class="el-icon-warning"></i> 最多上传@{{ limit }}张图片</div>
            </el-upload>
        </el-form-item>
        <el-form-item label="排查人：" prop="p_person">
            <el-input v-model="form.p_person" @input="store" @blur="store"  placeholder="请填写排查人"></el-input>
        </el-form-item>
        <el-form-item label="排查时间：" prop="p_time">
            <el-input v-model="form.p_time" @input="store" @blur="store"  placeholder="请填写排查时间"></el-input>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" class="button" :loading="button.loading" :disabled="button.disabled"
                       @click="submit">@{{ button.text }}
            </el-button>
        </el-form-item>
    </el-form>
    <div class="add">
        <el-button type="primary" class="button" size="mini" @click="submit">提 交</el-button>
        <el-button type="info" class="button" size="mini" @click="reset">重 置</el-button>
    </div>
</div>
</body>
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/jquery@3.6.4/dist/jquery.js"></script>
<script src="{{ asset('js/func.js') }}"></script>
<script src="{{ asset('js/conversion.js') }}"></script>
<script>
    new Vue({
        el: '#app',
        data: () => {
            return {
                button: {loading: false, disable: false, text: '提 交'},
                limit: 5,
                upload: "{{ route('api.upload.image') }}",
                form: {!! $info !!},
                streets: {!! $streets !!},
                specials: {!! $specials !!},
                natures: {!! $natures !!},
                shapes: {!! $shapes !!},
                forms: {!! $forms !!},
                sfpes: {!! $sfpes !!},
                maintenances: {!! $maintenances !!},
                funds: {!! $funds !!},
                rainsheds:  {!! $rainsheds !!},
                walls:   {!! $walls !!},
                bicycles: {!! $bicycles !!},
                signs: {!! $signs !!},
                channels: {!! $channels !!},
                speaks: {!! $speaks !!},
                fires: {!! $fires !!},
                fire_uses: {!! $fire_uses !!},
                hydrants: {!! $hydrants !!},
                hydrant_uses: {!! $hydrant_uses !!},
                whydrants: {!! $whydrants !!},
                whydrant_uses: {!! $whydrant_uses !!},
                outfires: {!! $outfires !!},
                outfire_uses: {!! $outfire_uses !!},
                smokes: {!! $smokes !!},
                smoke_uses: {!! $smoke_uses !!},
                shutters:  {!! $shutters !!},
                shutter_uses:   {!! $shutter_uses !!},
                gass: {!! $gass !!},
                gas_uses: {!! $gas_uses !!},
                keynotes: {!! $keynotes !!},
                warms: {!! $warms !!},
                hidden1s: {!! $hidden1s !!},
                hidden2s: {!! $hidden2s !!},
                hidden3s: {!! $hidden3s !!},
                hidden4s: {!! $hidden4s !!},
                hidden5s: {!! $hidden5s !!},
                hidden6s: {!! $hidden6s !!},
                hidden7s: {!! $hidden7s !!},
                hidden8s: {!! $hidden8s !!},
                hidden9s: {!! $hidden9s !!},
                hidden10s: {!! $hidden10s !!},
                hidden11s: {!! $hidden11s !!},
                hidden12s: {!! $hidden12s !!},
                hidden13s: {!! $hidden13s !!},
                hidden14s: {!! $hidden14s !!},
                rules: {
                    street: [{required: true, message: '请选择乡镇街道', trigger: 'change'}],
                    community: [{required: true, message: '请填写社区', trigger: 'blur'}],
                    village: [{required: true, message: '请填写小区', trigger: 'blur'}],
                    special: [{required: true, message: '请选择特殊楼栋', trigger: 'change'}],
                    building: [{required: true, message: '请填写楼栋', trigger: 'blur'}],
                    name: [{required: true, message: '请填写高层建筑名称', trigger: 'blur'}],
                    address: [{required: true, message: '请填写详细地址', trigger: 'blur'}],
                    thumb: [{required: true, message: '请上传建筑照片', trigger: 'blur'}],
                    area: [{required: true, message: '请填写建筑面积', trigger: 'blur'}],
                    ground: [{required: true, message: '请填写地上楼层', trigger: 'blur'}],
                    underground: [{required: true, message: '请填写地下楼层', trigger: 'blur'}],
                    height: [{required: true, message: '请填写高度', trigger: 'blur'}],
                    nature: [{required: true, message: '请选择建筑定性', trigger: 'change'}],
                    shape: [{required: true, message: '请选择建筑内使用功能', trigger: 'change'}],
                    year: [{required: true, message: '请填写建成年代', trigger: 'blur'}],
                    form: [{required: true, message: '请选择消防安全管理形式', trigger: 'change'}],
                    body: [{required: true, message: '请填写管理主体', trigger: 'blur'}],
                    person: [{required: true, message: '请填写消防安全管理人', trigger: 'blur'}],
                    sfpe: [{required: true, message: '请选择管理人是否是注册消防工程师', trigger: 'change'}],
                    mobile: [{required: true, message: '请填写联系电话', trigger: 'blur'}],
                    maintenance: [{required: true, message: '请选择有无维保单位', trigger: 'change'}],
                    fund: [{required: true, message: '请选择大修基金情况', trigger: 'change'}],
                    rainshed: [{required: true, message: '请选择是否存在可燃雨棚', trigger: 'change'}],
                    wall: [{required: true, message: '请选择是否存在违规设置突出外墙防护网现象', trigger: 'change'}],
                    bicycle: [{required: true, message: '请选择是否存在电动自行车违规停放充电现象', trigger: 'change'}],
                    sign: [{required: true, message: '请选择消防车道、消防车救援场地是否按要求设置标志标牌、施划标线', trigger: 'change'}],
                    channel: [{required: true, message: '请选择消防车通道情况', trigger: 'change'}],
                    speak: [{required: true, message: '请选择建筑内疏散通道、安全出口', trigger: 'change'}],
                    fire: [{required: true, message: '请选择火灾自动报警系统设置情况', trigger: 'change'}],
                    fire_use: [{required: true, message: '请选择火灾自动报警系统功能情况', trigger: 'change'}],
                    hydrant: [{required: true, message: '请选择室内消火栓系统设置情况', trigger: 'change'}],
                    hydrant_use: [{required: true, message: '请选择室内消火栓系统功能情况', trigger: 'change'}],
                    whydrant: [{required: true, message: '请选择室外消火栓系统设置情况', trigger: 'change'}],
                    whydrant_use: [{required: true, message: '请选择室外消火栓系统功能情况', trigger: 'change'}],
                    outfire: [{required: true, message: '请选择自动喷水灭火系统设置情况', trigger: 'change'}],
                    outfire_use: [{required: true, message: '请选择自动喷水灭火系统功能情况', trigger: 'change'}],
                    smoke: [{required: true, message: '请选择机械防、排烟系统设置情况', trigger: 'change'}],
                    smoke_use: [{required: true, message: '请选择机械防、排烟系统功能情况', trigger: 'change'}],
                    shutter: [{required: true, message: '请选择防火卷帘设置情况', trigger: 'change'}],
                    shutter_use: [{required: true, message: '请选择防火卷帘功能情况', trigger: 'change'}],
                    gas: [{required: true, message: '请选择气体灭火系统设置情况', trigger: 'change'}],
                    gas_use: [{required: true, message: '请选择气体灭火系统功能情况', trigger: 'change'}],
                    keynote: [{required: true, message: '请选择治理重点对象标签', trigger: 'change'}],
                    warm: [{required: true, message: '请选择建筑外墙外保温材料', trigger: 'change'}],
                    hidden1: [{required: true, message: '请选择是否存在人员密集场所室内采易燃可燃材料装修', trigger: 'change'}],
                    hidden2: [{required: true, message: '请选择是否存在违规设置群租房', trigger: 'change'}],
                    hidden3: [{required: true, message: '请选择是否存在搭建易燃可燃彩钢板', trigger: 'change'}],
                    hidden4: [{required: true, message: '请选择是否存在避难层（间）被占用或擅自改变用途', trigger: 'change'}],
                    hidden5: [{required: true, message: '请选择是否存在违规储存、经营、使用易燃易爆危险品', trigger: 'change'}],
                    hidden6: [{required: true, message: '请选择是否存在电气线路私拉乱接', trigger: 'change'}],
                    hidden7: [{required: true, message: '请选择是否存在电缆井内电气线路敷设不符合规范', trigger: 'change'}],
                    hidden8: [{required: true, message: '请选择是否存在防火封堵、被破坏', trigger: 'change'}],
                    hidden9: [{required: true, message: '请选择是否存在违规使用瓶装液化气石油气', trigger: 'change'}],
                    hidden10: [{required: true, message: '请选择是否存在燃气管线用具敷设安装不规范', trigger: 'change'}],
                    hidden11: [{required: true, message: '请选择是否存在消防控制室值班人员配备不到位', trigger: 'change'}],
                    hidden12: [{required: true, message: '请选择是否存在影响灭火救援的装饰、广告牌', trigger: 'change'}],
                    hidden13: [{required: true, message: '请选择是否存在配建车库违规改变使用功能', trigger: 'change'}],
                    hidden14: [{required: true, message: '请选择是否存在其他隐患', trigger: 'change'}],
                    p_address: [{required: true, message: '请填写排查地址', trigger: 'blur'}],
                    p_person: [{required: true, message: '请填写排查人', trigger: 'blur'}],
                    p_time: [{required: true, message: '请填写排查时间', trigger: 'blur'}],
                },
                thumbList: [],
                rainshedThumbList: [],
                wallThumbList: [],
                bicycleThumbList: [],
                signThumbList: [],
                channelThumbList: [],
                speakThumbList: [],
                fireUseThumbList: [],
                hydrantUseThumbList: [],
                whydrantUseThumbList: [],
                outfireUseThumbList: [],
                smokeUseThumbList: [],
                shutterUseThumbList: [],
                gasUseThumbList: [],
                hidden1ThumbList: [],
                hidden2ThumbList: [],
                hidden3ThumbList: [],
                hidden4ThumbList: [],
                hidden5ThumbList: [],
                hidden6ThumbList: [],
                hidden7ThumbList: [],
                hidden8ThumbList: [],
                hidden9ThumbList: [],
                hidden10ThumbList: [],
                hidden11ThumbList: [],
                hidden12ThumbList: [],
                hidden13ThumbList: [],
                hidden14ThumbList: [],
            }
        },
        created() {
            if(!this.form.id){
                let formData = JSON.parse(localStorage.getItem('formData'));
                if(formData){
                    this.form = formData;
                    this.form.id = 0;
                }
            }
            // let arr = [
            //     'thumb','rainshed_thumb','wall_thumb',
            //     'bicycle_thumb',  'sign_thumb', 'channel_thumb',
            //     'speak_thumb', 'fire_use_thumb',  'hydrant_use_thumb',
            //     'whydrant_use_thumb','outfire_use_thumb',
            //     'smoke_use_thumb',  'shutter_use_thumb',
            //     'gas_use_thumb', 'hidden1_thumb',
            //     'hidden2_thumb', 'hidden3_thumb', 'hidden4_thumb',
            //     'hidden5_thumb', 'hidden6_thumb', 'hidden7_thumb',
            //     'hidden8_thumb', 'hidden9_thumb', 'hidden10_thumb',
            //     'hidden11_thumb', 'hidden12_thumb', 'hidden13_thumb',
            //     'hidden14_thumb',
            // ];
            // arr.forEach((item,index)=>{
            //     this.form[item].forEach((_item,index)=>{
            //         !_item.status && this.form[item].splice(index, 1);
            //     });
            // });
            this.form.thumb.forEach((item,index)=>{
                item.status && this.thumbList.push(item);
            });
            this.form.rainshed_thumb.forEach((item,index)=>{
                item.status && this.rainshedThumbList.push(item);
            });
            this.form.wall_thumb.forEach((item,index)=>{
                item.status && this.wallThumbList.push(item);
            });
            this.form.bicycle_thumb.forEach((item,index)=>{
                item.status && this.bicycleThumbList.push(item);
            });
            this.form.sign_thumb.forEach((item,index)=>{
                item.status && this.signThumbList.push(item);
            });
            this.form.channel_thumb.forEach((item,index)=>{
                item.status && this.channelThumbList.push(item);
            });
            this.form.speak_thumb.forEach((item,index)=>{
                item.status && this.speakThumbList.push(item);
            });
            this.form.fire_use_thumb.forEach((item,index)=>{
                item.status && this.fireUseThumbList.push(item);
            });
            this.form.hydrant_use_thumb.forEach((item,index)=>{
                item.status && this.hydrantUseThumbList.push(item);
            });
            this.form.whydrant_use_thumb.forEach((item,index)=>{
                item.status && this.whydrantUseThumbList.push(item);
            });
            this.form.outfire_use_thumb.forEach((item,index)=>{
                item.status && this.outfireUseThumbList.push(item);
            });
            this.form.smoke_use_thumb.forEach((item,index)=>{
                item.status && this.smokeUseThumbList.push(item);
            });
            this.form.shutter_use_thumb.forEach((item,index)=>{
                item.status && this.shutterUseThumbList.push(item);
            });
            this.form.gas_use_thumb.forEach((item,index)=>{
                item.status && this.gasUseThumbList.push(item);
            });
            this.form.hidden1_thumb.forEach((item,index)=>{
                item.status && this.hidden1ThumbList.push(item);
            });
            this.form.hidden2_thumb.forEach((item,index)=>{
                item.status && this.hidden2ThumbList.push(item);
            });
            this.form.hidden3_thumb.forEach((item,index)=>{
                item.status && this.hidden3ThumbList.push(item);
            });
            this.form.hidden4_thumb.forEach((item,index)=>{
                item.status && this.hidden4ThumbList.push(item);
            });
            this.form.hidden5_thumb.forEach((item,index)=>{
                item.status && this.hidden5ThumbList.push(item);
            });
            this.form.hidden6_thumb.forEach((item,index)=>{
                item.status && this.hidden6ThumbList.push(item);
            });
            this.form.hidden7_thumb.forEach((item,index)=>{
                item.status && this.hidden7ThumbList.push(item);
            });
            this.form.hidden8_thumb.forEach((item,index)=>{
                item.status && this.hidden8ThumbList.push(item);
            });
            this.form.hidden9_thumb.forEach((item,index)=>{
                item.status && this.hidden9ThumbList.push(item);
            });
            this.form.hidden10_thumb.forEach((item,index)=>{
                item.status && this.hidden10ThumbList.push(item);
            });
            this.form.hidden11_thumb.forEach((item,index)=>{
                item.status && this.hidden11ThumbList.push(item);
            });
            this.form.hidden12_thumb.forEach((item,index)=>{
                item.status && this.hidden12ThumbList.push(item);
            });
            this.form.hidden13_thumb.forEach((item,index)=>{
                item.status && this.hidden13ThumbList.push(item);
            });
            this.form.hidden14_thumb.forEach((item,index)=>{
                item.status && this.hidden14ThumbList.push(item);
            });
        },
        methods: {
            submit() {
                this.$refs['form'].validate((valid, error) => {
                    if (valid) {
                        this.button.disabled = true;
                        this.button.loading = true;
                        this.button.text = '提交中...';
                        let target = "{{ route('home.index.update') }}";
                        let method = "post";
                        let data = this.form;
                        request(target, method, data).then((res) => {
                            this.button.disabled = false;
                            this.button.loading = false;
                            this.button.text = '提 交';
                            this.$message({
                                message: res.message,
                                duration: 1500,
                                type: res.status == 0 ? 'success' : 'error',
                                onClose: () => {
                                    if (res.status == 0) {
                                        localStorage.removeItem('formData');
                                        window.location.href = "{{ route('home.index.report') }}";
                                    }
                                }
                            });
                        }).catch((e) => {
                            this.button.disabled = false;
                            this.button.loading = false;
                            this.button.text = '提 交';
                        });
                    }else{
                        var a = [];
                        for (let key in error) {
                            a.push(error[key][0].message);
                        }
                        this.$message.error(a[0]);
                        this.$nextTick(() => {
                            const isError = document.getElementsByClassName('is-error')
                            isError[0].scrollIntoView({block: 'center', behavior: 'smooth'})
                            return
                        })
                        return false;
                    }
                });
            },
            async beforeUpload(file) {
                return await imageConversion.compressAccurately(file,200);
            },
            handleSuccess(e, res, file){
                if(res.status == 0){
                    this.form[e].push({name: file.name, status: file.status, uid: file.uid, url: file.response.data.path});
                    this.store();
                }else{
                    this.$message.error('上传出错，请重新上传')
                }

            },
            handleRemove(e, file, fileList){
                this.form[e].forEach((item,index)=>{
                    if(file.url == item.url){
                        this.form[e].splice(index, 1);
                        this.store();
                    }
                });
            },
            exceed(files, fileList){
                this.$message.error('最多上传5张图片哦！')
            },
            back(){
                window.location.href = "{{ route('home.index.report') }}";
            },
            change(e,val){
                switch (e){
                    case 'hydrant':
                    case 'whydrant':
                    case 'outfire':
                        if(val == 2){
                            this.form[e + '_use'] = 5;
                        }
                        break;
                    default:
                        if(val == 2){
                            this.form[e + '_use'] = 3;
                        }
                        break;
                }
                this.store();
            },
            store(){
                localStorage.setItem('formData', JSON.stringify(this.form))
            },
            storeStreet(val){
                this.form['address'] = '江北区' + this.streets[val];
                this.form['p_address'] = '江北区' + this.streets[val]
                localStorage.setItem('formData', JSON.stringify(this.form))
            },
            reset(){
                localStorage.removeItem('formData');
                window.location.reload();
            }
        },
    });
</script>
</html>
